/*
 * @Description: 路由
 */
import NewsAdd from '../views/news-manage/NewsAdd.vue';
import NewsList from '../views/news-manage/NewsList.vue';
import NewsEdit from '../views/news-manage/NewsEdit.vue';
import ProductAdd from '../views/product-manage/ProductAdd.vue';
import ProductList from '../views/product-manage/ProductList.vue';
import UserAdd from '../views/user-manage/UserAdd.vue';
import UserList from '../views/user-manage/UserList.vue';
import Center from '../views/center/Center.vue';
import Home from '../views/home/Home.vue';
import NotFound from '../views/notFound/NotFound.vue';

const routeConfig = [
  {
    path: '/center',
    name: 'center',
    component: Center,
    meta: {
      title: '个人中心',
    },
  },
  {
    path: '/index',
    component: Home,
    name: 'index',
    meta: {
      title: '首页',
    },
  },
  {
    path: '/user-manage/user-list',
    component: UserList,
    name: 'user-list',
    icon:'School'
,
    meta: {
      title: '用户列表',
    },
  },
  {
    path: '/user-manage/add-user',
    component: UserAdd,
    name: ' add-user',
    meta: {
      title: '添加用户',
    },
  },
  {
    path: '/product-manage/product-list',
    component: ProductList,
    name: 'product-list',
    meta: {
      title: '产品列表',
    },
  },
  {
    path: '/product-manage/add-product',
    component: ProductAdd,
    name: 'add-product',
    meta: {
      title: '添加产品',
    },
  },
  {
    path: '/news-manage/add-news',
    component: NewsAdd,
    name: 'add-news',
    meta: {
      title: '添加新闻',
    },
  },
  {
    path: '/news-manage/news-list',
    component: NewsList,
    name: 'news-list',
    meta: {
      title: '新闻列表',
    },
  },
  {
    path: '/news-manage/edit-news/:id',
    component: NewsEdit,
    name: 'edit-news',
    meta: {
      title: '编辑新闻',
    },
  },
  // {
  //   path: '/',
  //   redirect: '/index'
  // },
  {
    path: '/:pathMatch(.*)*',
    name: 'not-found',
    component: NotFound,
  },
];
export default routeConfig;
